home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / ispell-3.1.18src / config.x < prev    next >
Text File  |  1995-01-23  |  28KB  |  876 lines

  1. /*
  2.  * Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  *
  9.  * 1. Redistributions of source code must retain the above copyright
  10.  *    notice, this list of conditions and the following disclaimer.
  11.  * 2. Redistributions in binary form must reproduce the above copyright
  12.  *    notice, this list of conditions and the following disclaimer in the
  13.  *    documentation and/or other materials provided with the distribution.
  14.  * 3. All modifications to the source code must be clearly marked as
  15.  *    such.  Binary redistributions based on modified source code
  16.  *    must be clearly marked as modified versions in the documentation
  17.  *    and/or other materials provided with the distribution.
  18.  * 4. All advertising materials mentioning features or use of this software
  19.  *    must display the following acknowledgment:
  20.  *      This product includes software developed by Geoff Kuenning and
  21.  *      other unpaid contributors.
  22.  * 5. The name of Geoff Kuenning may not be used to endorse or promote
  23.  *    products derived from this software without specific prior
  24.  *    written permission.
  25.  *
  26.  * THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
  27.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29.  * ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
  30.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  32.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  33.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  34.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  35.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  36.  * SUCH DAMAGE.
  37.  */
  38.  
  39. /*
  40.  * This is the configuration file for ispell.  Thanks to Bob McQueer
  41.  * for creating it and making the necessary changes elsewhere to
  42.  * support it, and to George Sipe for figuring out how to make it easier
  43.  * to use.
  44.  *
  45.  * WARNING:  The Makefile edits this file (config.X) to produce config.h.
  46.  * If you are looking at config.h, you're in the wrong file.
  47.  *
  48.  * Look through this file from top to bottom.  If anything needs changing,
  49.  * create the header file "local.h" and define the correct values there;
  50.  * they will override this file.  If you don't make any changes to this
  51.  * file, future patching will be easier.
  52.  */
  53.  
  54. /*
  55.  * $Id: config.X,v 1.71 1995/01/08 23:23:28 geoff Exp $
  56.  *
  57.  * $Log: config.X,v $
  58.  * Revision 1.71  1995/01/08  23:23:28  geoff
  59.  * Add some more configuration variables: HAS_RENAME, MSDOS_BINARY_OPEN,
  60.  * HOME, PDICTHOME, HASHSUFFIX, STATSUFFIX, and COUNTSUFFIX.  These are
  61.  * all to make it easier to port ispell to MS-DOS.  Change DEFPAFF back
  62.  * to "words" so that only .ispell_words will be independent of language.
  63.  *
  64.  * Revision 1.70  1994/10/25  05:45:57  geoff
  65.  * Fix a tiny typo in a comment.  Add a configurable install command.
  66.  *
  67.  * Revision 1.69  1994/09/01  06:06:30  geoff
  68.  * Improve the the documentation of LANGUAGES to include working examples.
  69.  *
  70.  * Revision 1.68  1994/07/28  05:11:34  geoff
  71.  * Log message for previous revision: force MASKBITS to greater than or
  72.  * equal to MASKTYPE_WIDTH (simplifies configuration for 64-bit
  73.  * machines).
  74.  *
  75.  * Revision 1.67  1994/07/28  04:53:34  geoff
  76.  *
  77.  * Revision 1.66  1994/04/27  02:50:46  geoff
  78.  * Change the documentation and defaults for the languages variable to
  79.  * reflect the new method of making American and British dictionary
  80.  * variants.
  81.  *
  82.  * Revision 1.65  1994/04/27  01:50:28  geoff
  83.  * Add MAX_CAPS.
  84.  *
  85.  * Revision 1.64  1994/02/07  08:10:42  geoff
  86.  * Add GENERATE_LIBRARY_PROTOS as a special variable for use only by me.
  87.  *
  88.  * Revision 1.63  1994/01/26  07:44:45  geoff
  89.  * Make yacc configurable through local.h.
  90.  *
  91.  * Revision 1.62  1994/01/25  07:11:20  geoff
  92.  * Get rid of all old RCS log lines in preparation for the 3.1 release.
  93.  *
  94.  */
  95.  
  96. /* You may wish to specify your local definitions in this file: */
  97.  
  98. #include "local.h"    /* local definitions for options */
  99.  
  100. /*
  101. ** Major-differences selection.  The default system is BSD;  for USG
  102. ** or non-UNIX systems you should add the appropriate #define to local.h.
  103. */
  104. #ifndef USG
  105. #undef USG        /* Define this in local.h for System V machines */
  106. #endif /* USG */
  107.  
  108. #include <sys/param.h>
  109. #include <sys/types.h>
  110. #ifndef USG
  111. #include <sys/dir.h>
  112. #endif /* USG */
  113.  
  114. /*
  115. ** Things that normally go in a Makefile.  Define these just like you
  116. ** might in the Makefile, except you should use #define instead of
  117. ** make's assignment syntax.  Everything must be double-quoted, and
  118. ** (unlike make) you can't use any sort of $-syntax to pick up the
  119. ** values of other definitions.
  120. */
  121. #ifndef CC
  122. #define CC    "cc"
  123. #endif /* CC */
  124. #ifndef EMACS
  125. #define EMACS    "emacs"
  126. #endif /* EMACS */
  127. #ifndef LINT
  128. #define LINT    "lint"
  129. #endif /* LINT */
  130. #ifndef CFLAGS
  131. #define CFLAGS    "-O"
  132. #endif /* CFLAGS */
  133. #ifndef LINTFLAGS
  134. #define LINTFLAGS ""
  135. #endif /* LINTFLAGS */
  136. #ifndef YACC
  137. #define YACC    "yacc"
  138. #endif /* YACC */
  139.  
  140. /*
  141. ** Libraries that may need to be added to the cc line to get ispell to
  142. ** link.  Normally, this should be null.
  143. */
  144. #ifndef LIBES
  145. #define LIBES    ""
  146. #endif
  147.  
  148. /*
  149. ** TERMLIB - where to get the termcap library.  Should be -ltermcap or
  150. ** -lcurses on most systems.
  151. */
  152. #ifndef TERMLIB
  153. #define TERMLIB    "-ltermcap"
  154. #endif
  155.  
  156. /*
  157. ** REGLIB - where to get the regular-expression routines, if
  158. ** REGEX_LOOKUP is defined.  Should be -lPW on USG systems, null on
  159. ** BSD systems.
  160. */
  161. #ifndef REGLIB
  162. #define REGLIB    ""
  163. #endif
  164.  
  165. /*
  166. ** Where to install various components of ispell.  BINDIR contains
  167. ** binaries.  LIBDIR contains hash tables and affix files.  ELISPDIR
  168. ** contains emacs lisp files (if any) and TEXINFODIR contains emacs
  169. ** TeXinfo files.  MAN1DIR and MAN4DIR will hold the chapter-1 and
  170. ** chapter-4 manual pages, respectively.
  171. **
  172. ** If you intend to use multiple dictionary files, I would suggest
  173. ** LIBDIR be a directory which will contain nothing else, so sensible
  174. ** names can be constructed for the -d option without conflict.
  175. */
  176. #ifndef BINDIR
  177. #define BINDIR    "/usr/local/bin"
  178. #endif
  179. #ifndef LIBDIR
  180. #define LIBDIR    "/usr/local/lib"
  181. #endif
  182. #ifndef ELISPDIR
  183. #define ELISPDIR "/usr/local/lib/emacs/site-lisp"
  184. #endif
  185. #ifndef TEXINFODIR
  186. #define TEXINFODIR "/usr/local/info"
  187. #endif
  188. #ifndef MAN1DIR
  189. #define MAN1DIR    "/usr/local/man/man1"
  190. #endif
  191. #ifndef MAN4DIR
  192. #define MAN4DIR    "/usr/local/man/man4"
  193. #endif
  194.  
  195. /*
  196. ** Extensions to put on manual pages.  Usually these are ".1" or ".1l".
  197. */
  198. #ifndef MAN1EXT
  199. #define MAN1EXT    ".1"
  200. #endif
  201. #ifndef MAN4EXT
  202. #define MAN4EXT    ".4"
  203. #endif
  204.  
  205. /*
  206. ** List of all hash files (languages) which will be supported by ispell.
  207. **
  208. ** This variable has a complex format so that many options can be
  209. ** specified.  The format is as follows:
  210. **
  211. **    <language>[,<make-options>...] [<language> [,<make-options> ...] ...]
  212. **
  213. ** where
  214. **
  215. **    language    is the name of a subdirectory of the
  216. **            "languages" directory
  217. **    make-options    are options that are to be passed to "make" in
  218. **            the specified directory.  The make-options
  219. **            should not, in general, specify a target, as
  220. **            this will be provided by the make process.
  221. **
  222. ** For example, if LANGUAGES is:
  223. **
  224. **    "{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/dict/words /usr/dict/web2} {deutsch,DICTALWAYS=deutsch.sml,DICTOPTIONS=}"
  225. **
  226. ** then the American-English and Deutsch (German) languages will be supported,
  227. ** and the following variable settings will be passed to the two Makefiles:
  228. **
  229. **    American:
  230. **
  231. **        MASTERDICTS='american.med+'
  232. **        HASHFILES='americanmed+.hash'
  233. **        EXTRADICT='/usr/dict/words /usr/dict/web2'
  234. **
  235. **    Deutsch:
  236. **
  237. **        DICTALWAYS='deutsch.sml'
  238. **        DICTOPTIONS=''
  239. **
  240. ** Notes on the syntax: The makefile is not very robust.  If you have
  241. ** make problems, or if make seems to fail in the language-subdirs
  242. ** dependency, check your syntax.  The makefile adds single quotes to
  243. ** the individual variables in the LANGUAGES specification, so don't
  244. ** use quotes of any kind.
  245. **
  246. ** In the future, the first language listed in this variable will
  247. ** become the default, and the DEFHASH, DEFLANG, and DEFPAFF,
  248. ** variables will all become obsolete.  So be sure to put your default
  249. ** language first, to make later conversion easier!
  250. **
  251. ** Notes on options for the various languages will be found in the
  252. ** Makefiles for those languages.  Some of those languages may require
  253. ** you to also change various limits limits like MASKBITS or the
  254. ** length parameters.
  255. **
  256. ** A special note on the English language: because the British and
  257. ** American dialects use different spelling, you should usually select
  258. ** one or the other of these.  If you select both, the setting of
  259. ** MASTERHASH will determine which becomes the language linked to
  260. ** DEFHASH (which will usually be named english.hash).
  261. */
  262. #ifndef LANGUAGES
  263. #define LANGUAGES "{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/dict/words}"
  264. #endif /* LANGUAGES */
  265.  
  266. /*
  267. ** Master hash file for DEFHASH.  This is the name of a hash file
  268. ** built by a language Makefile.  It should be the most-popular hash
  269. ** file on your system, because it is the one that will be used by
  270. ** default.  It must be listed in LANGUAGES, above.
  271. */
  272. #ifndef MASTERHASH
  273. #define MASTERHASH    "americanmed+.hash"
  274. #endif
  275.  
  276. /*
  277. ** Default native-language hash file.  This is the name given to the
  278. ** hash table that will be used if no language is specified to
  279. ** ispell.  It is a link to MASTERHASH, above.
  280. */
  281. #ifndef DEFHASH
  282. #define DEFHASH "english.hash"
  283. #endif
  284.  
  285. /*
  286. ** Language tables for the default language.  This must be the name of
  287. ** the affix file that was used to generate the MASTERHASH/DEFHASH,
  288. ** above.
  289. */
  290. #ifndef DEFLANG
  291. #define DEFLANG    "english.aff"
  292. #endif
  293.  
  294. /*
  295. ** Language to use for error messages.  If there are no messages in this
  296. ** language, English will be used instead.
  297. */
  298. #ifndef MSGLANG
  299. #define MSGLANG    "english"
  300. #endif /* MSGLANG */
  301.  
  302. /*
  303. ** If your sort command accepts the -T switch to set temp file
  304. ** locations (try it out; it exists but is undocumented on some
  305. ** systems), make the following variable the null string.  Otherwise
  306. ** leave it as the sed script.
  307. */
  308. #ifndef SORTTMP
  309. #define SORTTMP    "-e '/!!SORTTMP!!/s/=.*$/=/'"
  310. #endif
  311.  
  312. /*
  313. ** If your sort command accepts the -T switch (see above), make the
  314. ** following variable refer to a temporary directory with lots of
  315. ** space.  Otherwise make it the null string.
  316. */
  317. #ifndef MAKE_SORTTMP
  318. #define MAKE_SORTTMP "-T ${TMPDIR-/usr/tmp}"
  319. #endif
  320.  
  321. /*
  322. ** INSTALL program. Could be a copy program like cp or something fancier
  323. ** like /usr/ucb/install -c
  324. */
  325. #ifndef INSTALL
  326. #define INSTALL        "cp"
  327. #endif
  328.  
  329. /*
  330. ** If your system has the rename(2) system call, define HAS_RENAME and
  331. ** ispell will use that call to rename backup files.  Otherwise, it
  332. ** will use link/unlink.  There is no harm in this except on MS-DOS,
  333. ** which doesn't support link/unlink.
  334. */
  335. #ifndef HAS_RENAME
  336. #undef HAS_RENAME
  337. #endif /* HAS_RENAME */
  338.  
  339. /* Aliases for some routines */
  340. #ifdef USG
  341. #define bcopy(s, d, n)    (void) memcpy (d, s, n)
  342. #define bzero(d, n)    (void) memset (d, 0, n)
  343. #define index strchr
  344. #define rindex strrchr
  345. #endif
  346.  
  347. /* type given to signal() by signal.h */
  348. #ifndef SIGNAL_TYPE
  349. #define SIGNAL_TYPE void
  350. #endif
  351.  
  352. /* environment variable for user's word list */
  353. #ifndef PDICTVAR
  354. #define PDICTVAR "WORDLIST"
  355. #endif
  356.  
  357. /* prefix part of default word list */
  358. #ifndef DEFPDICT
  359. #define DEFPDICT ".ispell_"
  360. #endif
  361.  
  362. /*
  363. ** suffix part of default word list
  364. */
  365. #ifndef DEFPAFF
  366. #define DEFPAFF "words"
  367. #endif
  368.  
  369. /* old place to look for default word list */
  370. #ifndef OLDPDICT
  371. #define OLDPDICT ".ispell_"
  372. #endif /* OLDPDICT */
  373. #ifndef OLDPAFF
  374. #define OLDPAFF "words"
  375. #endif /* OLDPAFF */
  376.  
  377. /* environment variable for include file string */
  378. #ifndef INCSTRVAR
  379. #define INCSTRVAR "INCLUDE_STRING"
  380. #endif
  381.  
  382. /* default include string */
  383. #ifndef DEFINCSTR
  384. #define DEFINCSTR "&Include_File&"
  385. #endif
  386.  
  387. /* mktemp template for temporary file - MUST contain 6 consecutive X's */
  388. #ifndef TEMPNAME
  389. #define TEMPNAME "/tmp/ispellXXXXXX"
  390. #endif
  391.  
  392. /*
  393. ** If REGEX_LOOKUP is undefined, the lookup command (L) will use the look(1)
  394. ** command (if available) or the egrep command.  If REGEX_LOOKUP is defined,
  395. ** the lookup command will use the internal dictionary and the
  396. ** regular-expression library (which you must supply separately.  There is
  397. ** a public-domain library available;  libraries are also distributed with
  398. ** both BSD and System V.
  399. **
  400. ** The advantage of no REGEX_LOOKUP is that it is often much faster, especially
  401. ** if the look(1) command is available, that the words found are presented
  402. ** in alphabetical order, and that the list of words searched is larger.
  403. ** The advantage of REGEX_LOOKUP is that ispell doesn't need to spawn another
  404. ** program, and the list of words searched is exactly the list of (root) words
  405. ** that ispell will accept.  (However, note that words formed with affixes will
  406. ** not be found;  this can produce some artifacts.  For example, since
  407. ** "brother" can be formed as "broth+er", a lookup command might fail to
  408. ** find "brother.")
  409. */
  410. #ifndef REGEX_LOOKUP
  411. #undef REGEX_LOOKUP
  412. #endif /* REGEX_LOOKUP */
  413.  
  414. /*
  415. ** Choose the proper type of regular-expression routines here.  BSD
  416. ** and public-domain systems have routines called re_comp and re_exec;
  417. ** System V uses regcmp and regex.
  418. */
  419. #ifdef REGEX_LOOKUP
  420. #ifndef REGCMP
  421. #ifdef USG
  422. #define REGCMP(str)        regcmp (str, (char *) 0)
  423. #define REGEX(re, str, dummy)    regex (re, str, dummy, dummy, dummy, dummy, \
  424.                     dummy, dummy, dummy, dummy, dummy, dummy)
  425. #else /* USG */
  426. #define REGCMP(str)        re_comp (str)
  427. #define REGEX(re, str, dummy)    re_exec (str)
  428. #endif /* USG */
  429. #endif /* REGCMP */
  430. #endif /* REGEX_LOOKUP */
  431.  
  432. /* look command (if look(1) MAY BE available - ignored if not) */
  433. #ifndef REGEX_LOOKUP
  434. #ifndef LOOK
  435. #define    LOOK    "look -df"
  436. #endif
  437. #endif /* REGEX_LOOKUP */
  438.  
  439. /* path to egrep (use speeded up version if available) */
  440. #ifndef EGREPCMD
  441. #ifdef    USG
  442. #define EGREPCMD "/bin/egrep"
  443. #else
  444. #define EGREPCMD "/usr/bin/egrep -i"
  445. #endif
  446. #endif
  447.  
  448. /* path to wordlist for Lookup command (typically /usr/dict/{words|web2}) */
  449. /* note that /usr/dict/web2 is usually a bad idea due to obscure words */
  450. #ifndef WORDS
  451. #define WORDS    "/usr/dict/words"
  452. #endif
  453.  
  454. /* buffer size to use for file names if not in sys/param.h */
  455. #ifndef MAXPATHLEN
  456. #define MAXPATHLEN 240
  457. #endif
  458.  
  459. /* max file name length (will truncate to fit BAKEXT) if not in sys/param.h */
  460. #ifndef MAXNAMLEN
  461. #define MAXNAMLEN 14
  462. #endif
  463.  
  464. /* define if you want .bak file names truncated to MAXNAMLEN characters */
  465. #ifndef TRUNCATEBAK
  466. #undef TRUNCATEBAK
  467. #endif /* TRUNCATEBAK */
  468.  
  469. /* largest word accepted from a file by any input routine, plus one */
  470. #ifndef    INPUTWORDLEN
  471. #define INPUTWORDLEN 100
  472. #endif
  473.  
  474. /* largest amount that a word might be extended by adding affixes */
  475. #ifndef MAXAFFIXLEN
  476. #define MAXAFFIXLEN 20
  477. #endif
  478.  
  479. /*
  480. ** Define the following to suppress the 8-bit character feature.
  481. ** Unfortunately, this doesn't work as well as it might, because ispell
  482. ** only strips the 8th bit in some places.  For example, it calls strcmp()
  483. ** quite often without first stripping parity.  However, I really wonder
  484. ** about the utility of this option, so I haven't bothered to fix it.  If
  485. ** you think the stripping feature of NO8BIT is useful, you might let me
  486. ** (Geoff Kuenning) know.
  487. **
  488. ** Nevertheless, NO8BIT is a useful option for other reasons.  If NO8BIT
  489. ** is defined, ispell will probably use 8-bit characters internally;
  490. ** this improves time efficiency and saves a small amount of space
  491. ** in the hash file.  Thus, I recommend you specify NO8BIT unless you
  492. ** actually expect to be spelling files which use a 256-character set.
  493. */ 
  494. #ifndef NO8BIT
  495. #undef NO8BIT
  496. #endif /* NO8BIT */
  497.  
  498. /*
  499. ** Number of mask bits (affix flags) supported.  Must be 32, 64, 128, or
  500. ** 256.  If MASKBITS is 32 or 64, there are really only 26 or 58 flags
  501. ** available, respectively.  If it is 32, the flags are named with the
  502. ** 26 English uppercase letters;  lowercase will be converted to uppercase.
  503. ** If MASKBITS is 64, the 58 flags are named 'A' through 'z' in ASCII
  504. ** order, including the 6 special characters from 'Z' to 'a': "[\]^_`".
  505. ** If MASKBITS is 128 or 256, all the 7-bit or 8-bit characters,
  506. ** respectively, are theoretically available, though a few (newline, slash,
  507. ** null byte) are pretty hard to actually use successfully.
  508. **
  509. ** Note that a number of non-English affix files depend on having a
  510. ** larger value for MASKBITS.  See the affix files for more
  511. ** information.
  512. */
  513. #ifndef MASKBITS
  514. #define MASKBITS    32
  515. #endif
  516.  
  517. /*
  518. ** C type to use for masks.  This should be a type that the processor
  519. ** accesses efficiently.
  520. **
  521. ** MASKTYPE_WIDTH must correctly reflect the number of bits in a
  522. ** MASKTYPE.  Unfortunately, it is also required to be a constant at
  523. ** preprocessor time, which means you can't use the sizeof operator to
  524. ** define it.
  525. **
  526. ** Note that MASKTYPE *must* match MASKTYPE_WIDTH or you may get
  527. ** division-by-zero errors! 
  528. */
  529. #ifndef MASKTYPE
  530. #define MASKTYPE    long
  531. #endif
  532. #ifndef MASKTYPE_WIDTH
  533. #define MASKTYPE_WIDTH    32
  534. #endif
  535. #if MASKBITS < MASKTYPE_WIDTH
  536. #undef MASKBITS
  537. #define MASKBITS    MASKTYPE_WIDTH
  538. #endif /* MASKBITS < MASKTYPE_WIDTH */
  539.  
  540.  
  541. /* maximum number of include files supported by xgets;  set to 0 to disable */
  542. #ifndef MAXINCLUDEFILES
  543. #define MAXINCLUDEFILES    5
  544. #endif
  545.  
  546. /*
  547. ** Maximum hash table fullness percentage.  Larger numbers trade space
  548. ** for time.
  549. **/
  550. #ifndef MAXPCT
  551. #define MAXPCT    70        /* Expand table when 70% full */
  552. #endif
  553.  
  554. /*
  555. ** Maximum number of "string" characters that can be defined in a
  556. ** language (affix) file.  Don't forget that an upper/lower string
  557. ** character counts as two!
  558. */
  559. #ifndef MAXSTRINGCHARS
  560. #define MAXSTRINGCHARS 100
  561. #endif /* MAXSTRINGCHARS */
  562.  
  563. /*
  564. ** Maximum length of a "string" character.  The default is appropriate for
  565. ** nroff-style characters starting with a backslash.
  566. */
  567. #ifndef MAXSTRINGCHARLEN
  568. #define MAXSTRINGCHARLEN 10
  569. #endif /* MAXSTRINGCHARLEN */
  570.  
  571. /*
  572. ** the NOPARITY mask is applied to user input characters from the terminal
  573. ** in order to mask out the parity bit.
  574. */
  575. #ifdef NO8BIT
  576. #define NOPARITY 0x7f
  577. #else
  578. #define NOPARITY 0xff
  579. #endif
  580.  
  581.  
  582. /*
  583. ** the terminal mode for ispell, set to CBREAK or RAW
  584. **
  585. */
  586. #ifndef TERM_MODE
  587. #define TERM_MODE    CBREAK
  588. #endif
  589.  
  590. /*
  591. ** Define this if you want your columns of words to be of equal length.
  592. ** This will spread short word lists across the screen instead of down it.
  593. */
  594. #ifndef EQUAL_COLUMNS
  595. #undef EQUAL_COLUMNS
  596. #endif /* EQUAL_COLUMNS */
  597.  
  598. /*
  599. ** This is the extension that will be added to backup files
  600. */
  601. #ifndef    BAKEXT
  602. #define    BAKEXT    ".bak"
  603. #endif
  604.  
  605. /*
  606. ** Define this if you want to suppress the capitalization-checking
  607. ** feature.  This will reduce the size of the hashed dictionary on
  608. ** most 16-bit and some 32-bit machines.  This option is not
  609. ** recommended.
  610. */
  611. #ifndef NO_CAPITALIZATION_SUPPORT
  612. #undef NO_CAPITALIZATION_SUPPORT
  613. #endif /* NO_CAPITALIZATION_SUPPORT */
  614.  
  615. /*
  616. ** Define this if you want your personal dictionary sorted.  This may take
  617. ** a long time for very large dictionaries.  Dictionaries larger than
  618. ** SORTPERSONAL words will not be sorted.  Define SORTPERSONAL as zero
  619. ** to disable this feature.
  620. */
  621. #ifndef SORTPERSONAL
  622. #define SORTPERSONAL    1000
  623. #endif
  624.  
  625. /*
  626. ** Define this if you want to use the shell for interpretation of commands
  627. ** issued via the "L" command, "^Z" under System V, and "!".  If this is
  628. ** not defined then a direct fork()/exec() will be used in place of the
  629. ** normal system().  This may speed up these operations greately on some
  630. ** systems.
  631. */
  632. #ifndef USESH
  633. #undef USESH
  634. #endif /* USESH */
  635.  
  636. /*
  637. ** Maximum language-table search size.  Smaller numbers make ispell
  638. ** run faster, at the expense of more memory (the lowest reasonable value
  639. ** is 2).  If a given character appears in a significant position in
  640. ** more than MAXSEARCH suffixes, it will be given its own index table.
  641. ** If you change this, define INDEXDUMP in lookup.c to be sure your
  642. ** index table looks reasonable.
  643. */
  644. #ifndef MAXSEARCH
  645. #define MAXSEARCH 4
  646. #endif
  647.  
  648. /*
  649. ** Define this if you want to be able to type any command at a "type space
  650. ** to continue" prompt.
  651. */
  652. #ifndef COMMANDFORSPACE
  653. #undef COMMANDFORSPACE
  654. #endif /* COMMANDFORSPACE */
  655.  
  656. /*
  657. ** Memory-allocation increment.  Buildhash allocates memory in chunks
  658. ** of this size, and then subdivides it to get its storage.  This saves
  659. ** much malloc execution time.  A good number for this is the system
  660. ** page size less the malloc storage overhead.
  661. **
  662. ** Define this to zero to revert to using malloc/realloc.  This is normally
  663. ** useful only on systems with limited memory.
  664. */
  665. #ifndef MALLOC_INCREMENT
  666. #define MALLOC_INCREMENT    (4096 - 8)
  667. #endif
  668.  
  669. /*
  670. ** Maximum number of "hits" expected on a word.  This is basically the
  671. ** number of different ways different affixes can produce the same word.
  672. ** For example, with "english.aff", "brothers" can be produced 3 ways:
  673. ** "brothers," "brother+s", or "broth+ers".  If this is too low, no major
  674. ** harm will be done, but ispell may occasionally forget a capitalization.
  675. */
  676. #ifndef MAX_HITS
  677. #define MAX_HITS    10
  678. #endif
  679.  
  680. /*
  681. ** Maximum number of capitalization variations expected in any word.
  682. ** Besides the obvious all-lower, all-upper, and capitalized versions,
  683. ** this includes followcase variants.  If this is too low, no real
  684. ** harm will be done, but ispell may occasionally fail to suggest a
  685. ** correct capitalization.
  686. */
  687. #ifndef MAX_CAPS
  688. #define MAX_CAPS    10
  689. #endif /* MAX_CAPS */
  690.  
  691. /* Define this to ignore spelling check of entire LaTeX bibliography listings */
  692. #ifndef IGNOREBIB
  693. #undef IGNOREBIB
  694. #endif
  695.  
  696. /*
  697. ** Default nroff and TeX special characters.  Normally, you won't want to
  698. ** change this;  instead you would override it in the language-definition
  699. ** file.
  700. */
  701. #ifndef TEXSPECIAL
  702. #define TEXSPECIAL    "()[]{}<>\\$*.%"
  703. #endif
  704.  
  705. #ifndef NRSPECIAL
  706. #define NRSPECIAL    "().\\*"
  707. #endif
  708.  
  709. /*
  710. ** Defaults for certain command-line flags.
  711. */
  712. #ifndef DEFNOBACKUPFLAG
  713. #define DEFNOBACKUPFLAG    0            /* Don't suppress backup file */
  714. #endif
  715. #ifndef DEFTEXFLAG
  716. #define DEFTEXFLAG    0            /* Default to nroff mode */
  717. #endif
  718.  
  719. /*
  720. ** Define this if you want ispell to place a limitation on the maximum
  721. ** size of the screen.  On windowed workstations with very large windows,
  722. ** the size of the window can be too much of a good thing, forcing the
  723. ** user to look back and forth between the bottom and top of the screen.
  724. ** If MAX_SCREEN_SIZE is nonzero, screens larger than this will be treated
  725. ** as if they have only MAX_SCREEN_SIZE lines.  A good value for this
  726. ** variable is 24 or 30.  Define it as zero to suppress the feature.
  727. */
  728. #ifndef MAX_SCREEN_SIZE
  729. #define MAX_SCREEN_SIZE 0
  730. #endif
  731.  
  732. /*
  733. ** The next three variables are used to provide a variable-size context
  734. ** display at the bottom of the screen.  Normally, the user will see
  735. ** a number of lines equal to CONTEXTPCT of his screen, rounded down
  736. ** (thus, with CONTEXTPCT == 10, a 24-line screen will produce two lines
  737. ** of context).  The context will never be greater than MAXCONTEXT or
  738. ** less than MINCONTEXT.  To disable this feature entirely, set MAXCONTEXT
  739. ** and MINCONTEXT to the same value.  To round context percentages up,
  740. ** define CONTEXTROUNDUP.
  741. **
  742. ** Warning: don't set MAXCONTEXT ridiculously large.  There is a
  743. ** static buffer of size MAXCONTEXT*BUFSIZ; since BUFSIZ is frequently
  744. ** 1K or larger, this can create a remarkably large executable.
  745. */
  746. #ifndef CONTEXTPCT
  747. #define CONTEXTPCT    10    /* Use 10% of the screen for context */
  748. #endif
  749. #ifndef MINCONTEXT
  750. #define MINCONTEXT    2    /* Always show at least 2 lines of context */
  751. #endif
  752. #ifndef MAXCONTEXT
  753. #define MAXCONTEXT    10    /* Never show more than 10 lines of context */
  754. #endif
  755. #ifndef CONTEXTROUNDUP
  756. #undef CONTEXTROUNDUP        /* Don't round context up */
  757. #endif
  758.  
  759. /*
  760. ** Define this if you want the context lines to be displayed at the
  761. ** bottom of the screen, the way they used to be, rather than at the top.
  762. */
  763. #ifndef BOTTOMCONTEXT
  764. #undef BOTTOMCONTEXT
  765. #endif /* BOTTOMCONTEXT */
  766.  
  767. /*
  768. ** Define this if you want the "mini-menu," which gives the most important
  769. ** options at the bottom of the screen, to be the default (in any case, it
  770. ** can be controlled with the "-M" switch).
  771. */
  772. #ifndef MINIMENU
  773. #undef MINIMENU
  774. #endif
  775.  
  776. /*
  777. ** You might want to change this to zero if your users want to check
  778. ** single-letter words against the dictionary.  However, you should try
  779. ** some sample runs using the -W switch before you try it out;  you'd
  780. ** be surprised how many single letters appear in documents.  If you increase
  781. ** MINWORD beyond 1, don't say I didn't warn you that it was a bad idea.
  782. */
  783. #ifndef MINWORD
  784. #define MINWORD        1    /* Words this short and shorter are always ok */
  785. #endif
  786.  
  787. /*
  788. ** ANSI C compilers are supposed to provide an include file,
  789. ** "stdlib.h", which gives function prototypes for all library
  790. ** routines.  Define NO_STDLIB_H if you have a compiler that claims to
  791. ** be ANSI, but doesn't provide this include file.
  792. */
  793. #ifndef NO_STDLIB_H
  794. #ifndef __STDC__
  795. #define NO_STDLIB_H
  796. #endif /* __STDC__ */
  797. #endif /* NO_STDLIB_H */
  798.  
  799. /*
  800. ** The following define is used by the ispell developer to help
  801. ** double-check the software.  Leave it undefined on other systems
  802. ** unless you are especially fond of warning messages, or are pursuing
  803. ** an inexplicable bug that might be related to a type mismatch.
  804. */
  805. #ifndef GENERATE_LIBARARY_PROTOS
  806. #undef GENERATE_LIBARARY_PROTOS
  807. #endif /* GENERATE_LIBARARY_PROTOS */
  808.  
  809. /*
  810. ** Symbols below this point are generally intended to cater to
  811. ** idiosyncracies of specific machines and operating systems.
  812. **
  813. ** MS-DOS users should also define HAS_RENAME, above, if appropriate.
  814. **
  815. ** Define PIECEMEAL_HASH_WRITES if your system can't handle huge write
  816. ** operations.  This is known to be a problem on some MS-DOS systems.
  817. */
  818. #ifndef PIECEMEAL_HASH_WRITES
  819. #undef PIECEMEAL_HASH_WRITES
  820. #endif /* PIECEMEAL_HASH_WRITES */
  821.  
  822. /*
  823. ** Redefine GETKEYSTROKE() to getkey() on some MS-DOS systems where
  824. ** getchar() doesn't operate properly in raw mode.
  825. */
  826. #ifndef GETKEYSTROKE
  827. #define GETKEYSTROKE()    getchar ()
  828. #endif /* GETKEYSTROKE */
  829.  
  830. /*
  831. ** Define MSDOS_BINARY_OPEN to 0x8000 on MS-DOS systems.  This can be
  832. ** done by adding "#include fcntl.h" to your local.h file.
  833. */
  834. #ifndef MSDOS_BINARY_OPEN
  835. #ifdef O_BINARY
  836. #define MSDOS_BINARY_OPEN   O_BINARY
  837. #else /* O_BINARY */
  838. #define MSDOS_BINARY_OPEN   0
  839. #endif /* O_BINARY */
  840. #endif /* MSDOS_BINARY_OPEN */
  841.  
  842. /*
  843. ** Environment variable to use to locate the home directory.  On DOS
  844. ** systems you might want to set this to ISPELL_HOME to avoid
  845. ** conflicts with other programs that look for a HOME environment
  846. ** variable; on all other systems it should be just HOME.
  847. */
  848. #ifndef HOME
  849. #define HOME    "HOME"
  850. #endif /* HOME */
  851.  
  852. /*
  853. ** On MS-DOS systems, define PDICTHOME to be the name of a directory
  854. ** to be used to contain the personal dictionary (.ispell_english,
  855. ** etc.).  On other systems, you can leave it undefined.
  856. */
  857. #ifndef PDICTHOME
  858. #undef PDICTHOME
  859. #endif /* PDICTHOME */
  860.  
  861. /*
  862. ** On MS-DOS systems, you can rename the following variables so that
  863. ** ispell's files have 3-character suffixes.  Note that, if you do
  864. ** this, you will have to redefine any variable above that
  865. ** incorporates one of the suffixes.
  866. */
  867. #ifndef HASHSUFFIX
  868. #define HASHSUFFIX    ".hash"
  869. #endif /* HASHSUFFIX */
  870. #ifndef STATSUFFIX
  871. #define STATSUFFIX    ".stat"
  872. #endif /* STATSUFFIX */
  873. #ifndef COUNTSUFFIX
  874. #define COUNTSUFFIX    ".cnt"
  875. #endif /* COUNTSUFFIX */
  876.